home *** CD-ROM | disk | FTP | other *** search
- /*//////////////////////////////////////////////////////////////////////
- Filename: wsn-object-edit.js
- Company Name: Computer Associates International, Inc.
- Legal Copyright: Copyright (c) Computer Associates International, Inc.
- Author: Ales Novak
- Product: Tiny Firewall
- Description: some string constants independent of language of translation
- Last Modification: August 5, 2004
- Revision History:
- Created July 2004
- ///////////////////////////////////////////////////////////////////////*/
-
- function ShowObjectEditNoDB(strObjID, eObjType, bClientRule, bNoReload)
- {
- if ( isSPEditable() )
- {
- var definitionList = getDefinitionList(false);
-
- try
- {
- var definition = definitionList.Get( strObjID );
-
- return ShowObjectEdit(strObjID, eObjType, false, true);
- }
- catch (e)
- {
- }
- }
-
- if ( bClientRule )
- {
- var definitionList = getDefinitionList(true);
-
- try
- {
- var definition = definitionList.Get( strObjID );
-
- return ShowObjectEdit(strObjID, eObjType, true, true);
- }
- catch (e)
- {
- }
- }
- alert( processMsg( getStr('','STR_MSG_CANNOT_EDIT_PRE_OBJ'), strObjID ));
-
- return;
- }
-
- function ShowObjectEdit(strObjID, eObjType, bClientParser, bNoReload)
- {
- var arParams = new Array();
-
- arParams[0] = external;
- arParams[1] = strObjID;
-
- if ( getObj('_tmp_obj_edit') )
- arParams[2] = _tmp_obj_edit.objtype.value;
- else
- arParams[2] = eObjType;
- arParams[3] = bClientParser;
-
- var sFeatures="dialogHeight: 270px; dialogWidth: 680px; help:no; status:no; resizable:no; center:yes;";
-
- var arRetVal = window.showModalDialog( 'wsn-object-edit.html', arParams, sFeatures );
- var retValue = '';
-
- if (arRetVal && arRetVal[0] == "ok")
- {
- if ( !bNoReload )
- location.reload();
-
- return arRetVal[1];
- }
-
- return '';
- }
-
- function ComposeObjectsEditForm( strCurrentPageUrl, eObjType, strObjectHdr, strListHdr )
- {
- var strForm = "";
-
- strForm =
- '<form name="_tmp_obj_edit" id="_tmp_obj_edit">' +
- '<input type="hidden" name="curpage" value="' + strCurrentPageUrl + '">' +
- '<input type="hidden" name="objhdr" value="' + strObjectHdr + '">' +
- '<input type="hidden" name="listhdr" value="' + strListHdr + '">' +
- '<input type="hidden" name="objtype" value="' + eObjType + '">' +
- '</form>';
-
- return strForm;
- }
-
-